home *** CD-ROM | disk | FTP | other *** search
- «RM70»
- Once you have a copy of SAFARI.COM, the best way to load it is
- by making the command the first line in your AUTOEXEC.BAT file.
- (Make sure, of course, that the program itself is either in your root
- directory or that you specify the full pathname so that DOS can find
- it.) This ensures that SAFARI will be the first program to load
- after DOS is initialized. SAFARI will hook itself into DOS and be
- completely invisible to all remaining programs.
- From that point on, anytime a critical interrupt occurs,
- SAFARI will take over. A window will appear on the screen detailing
- the type of error that occured, and showing the contents of the CPU
- registers that caused the failed operation. Figure 1 shows a screen
- shot of a SAFARI window caused by executing DIR A: with no disk in
- the drive.
- After saving the screen contents under the window, and
- displaying the registers and error information, SAFARI simply passes
- control to DOS, which generates the response prompt. Select from
- Abort, Retry, Ignore. If a valid response is entered, SAFARI will
- restore the screen to its previous condition and your application
- will continue. (Note that DOS 3.3 modifies the prompt message. The
- Fail option is either substituted for Ignore, or added to the list.
- Fail differs from Ignore in that the calling program is told that an
- error has occured. Since there are more installations of pre-3.3
- DOS, however, I'll stick to the common conventions here. If you're
- using 3.3, though, keep the substitution in mind.)
-
-
- RUNNING DEBUG WITH SAFARI I mentioned earlier that DEBUG changes
- the Int 24h address to point to itself. If an Int 24h occurs while
- running a program under DEBUG, control is passed to DEBUG and then to
- the DOS CEH by a simulated interrupt. When SAFARI gets control, an
- extra three words have been pushed onto the stack by DEBUG. SAFARI's
- register dump will therefore be incorrect, as it relies on stack
- position for its arguments. The same situation would apply if an
- application program were to force Int 24h to pass through its own CEH.
- If you're interested in improving SAFARI to reflect these
- contingencies, you can modify the program to check the Int 24h address
- in low memory whenever it is invoked. If the address is different
- than when it was installed, a new CEH has been installed and no stack
- dump should be performed.